<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:with="title='AI绘画首页',active='home'">
<head th:replace="/header::headerFragment(title,active)">
<!--    <meta charset="UTF-8">-->
<!--    <title>Ai在线绘画</title>-->
<!--    <link href="css/bootstrap.min.css" rel="stylesheet">-->
</head>
<body>
<div th:replace="/header::header-body"></div>



<div class="container-fluid">
<div class="row">
    <div class="col-md-12">
        <div class="jumbotron bg-info">
            <h1>来成为魔法师吧~ヾ(≧▽≦*)o</h1>
            <p>1，登录或注册账号 2，输入画作描述词 3，生成图片</p>
            <p><a class="btn btn-primary btn-lg" href="/generate" role="button">现在开始绘画</a></p>
        </div>
    </div>
</div>
    <div class="row">
        <div class="col-md-12">
        <div class="page-header">
            <h1>大家喜欢的图片<small>获赞最多的前20名</small></h1><!--    页头-->
        </div>
        </div>
    </div>

    <div class="row">
        <div  class="col-md-3" th:id="${hotimages.img_path}" th:each=" hotimages: ${hotimages1}">

            <div class="thumbnail">
                <img th:src="@{'/images/'+${hotimages.img_path}}" alt="..." style="height:50%;width:50%">
                <div class="caption">
                    <h3>作者：<th:block th:text="${hotimages.author}"></th:block></h3>
                    <p>文件名:<th:block th:text="${hotimages.img_path}"></th:block>  </p>
                    <form action="GiveLike" method="get">
                        <input type="text" class="form-control" name="img_path" id="img_path3" style="display: none" th:value="@{${hotimages.img_path}}">
                        <input type="text" class="form-control" name="like" id="like1" style="display: none" th:value="@{${hotimages.like}}">

                        <button class="btn btn-primary" type="submit">点赞</button>

                    </form>
                    <form action="ImageDetail" method="get">
                      <input type="text" class="form-control" name="img_path" id="img_path" style="display: none" th:value="@{${hotimages.img_path}}">

                      <button class="btn btn-default" type="submit">图片详情</button>

                    </form>



                        <span class="label label-info">点赞数:<th:block th:text="${hotimages.like}"></th:block></span>
                    </p>
                </div>
            </div>
        </div>


    </div>
    <div class="row">
        <div  class="col-md-3" th:id="${hotimages.img_path}" th:each=" hotimages: ${hotimages2}">

            <div class="thumbnail">
                <img th:src="@{'/images/'+${hotimages.img_path}}" alt="..." style="height:50%;width:50%">
                <div class="caption">
                    <h3>作者：<th:block th:text="${hotimages.author}"></th:block></h3>
                    <p>文件名:<th:block th:text="${hotimages.img_path}"></th:block>  </p>


                    <form action="GiveLike" method="get">
                    <input type="text" class="form-control" name="img_path" id="img_path4" style="display: none" th:value="@{${hotimages.img_path}}">
                    <input type="text" class="form-control" name="like" id="like2" style="display: none" th:value="@{${hotimages.like}}">

                    <button class="btn btn-primary" type="submit">点赞</button>

                    </form>
                    <form action="ImageDetail" method="get">
                        <input type="text" class="form-control" name="img_path" id="img_path2" style="display: none" th:value="@{${hotimages.img_path}}">

                        <button class="btn btn-default" type="submit">图片详情</button>

                    </form>



                    <span class="label label-info">点赞数:<th:block th:text="${hotimages.like}"></th:block></span>
                    </p>
                </div>
            </div>
        </div>


    </div>
    <!-- 文章分页信息 hotimages不带1和2 的是给分页用的-->
    <div class="row">
        <div th:replace="paging :: pageAdminNav(${hotimages})"></div>
    </div>
</div>



<div th:replace="/footer::footer"></div>

</body>
</html>
